<!--
========================================================================
 *  Copyright by KNIME AG, Zurich, Switzerland
 *  Website: http://www.knime.com; Email: contact@knime.com
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License, Version 3, as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, see <http://www.gnu.org/licenses>.
 *
 *  Additional permission under GNU GPL version 3 section 7:
 *
 *  KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs.
 *  Hence, KNIME and ECLIPSE are both independent programs and are not
 *  derived from each other. Should, however, the interpretation of the
 *  GNU GPL Version 3 ("License") under any applicable laws result in
 *  KNIME and ECLIPSE being a combined program, KNIME AG herewith grants
 *  you the additional permission to use and propagate KNIME together with
 *  ECLIPSE with only the license terms in place for ECLIPSE applying to
 *  ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the
 *  license terms of ECLIPSE themselves allow for the respective use and
 *  propagation of ECLIPSE together with KNIME.
 *
 *  Additional permission relating to nodes for KNIME that extend the Node
 *  Extension (and in particular that are based on subclasses of NodeModel,
 *  NodeDialog, and NodeView) and that only interoperate with KNIME through
 *  standard APIs ("Nodes"):
 *  Nodes are deemed to be separate and independent programs and to not be
 *  covered works.  Notwithstanding anything to the contrary in the
 *  License, the License does not apply to Nodes, you are not required to
 *  license Nodes under the License, and you are granted a license to
 *  prepare and propagate Nodes, in each case even if such Nodes are
 *  propagated with or for interoperation with KNIME.  The owner of a Node
 *  may freely choose the license terms applicable to such Node, including
 *  when such Node is propagated with or for interoperation with KNIME.
====================================================================
-->
<body>
<p>
Contains the basic viewing framework for KNIME. Its main elements
are so-called plotters. A plotter consists of four elements:</p>
<ul>
<li>The plotter which does the mapping of points to screen coordinates and is
the composite element. </li>
<li>
The DrawingPane where the actual drawing is done. The drawing pane knows nothing 
about the domain values but only the screen coordinates.
</li>
<li>
The ScrollPane. The drawing pane is embedded in a scroll pane. The scroll pane
represents a coordinate system with the x axis from left to right and a y 
axis from bottom to top! (Different from java built-in coordinate system.)
</li>
<li>
A properties panel, which contains the control elements for the plotter. 
Should be extended in order to keep the core functionality available.
</li>
</ul>
The following illustration demonstrates how these elements are connected:<br />
<img src="doc-files/overviewPic.png" alt="The combination of the above listet plotter elements" />
<p>
There exists a hierarchy of plotters each adds some functionality. 
They may be extended at every point in the hierarchy. 
</p>
<p>
The most abstract plotter is the {@link org.knime.base.node.viz.plotter.AbstractPlotter}
 which provides functionality of
selection, zooming, moving and correctly resizing the component. 
Although it is an abstract plotter X and Y axis may be set.
</p>
<p>
The next plotter in the hierarchy is the {@link org.knime.base.node.viz.plotter.basic.BasicPlotter} 
which provides functionality to plot basic drawing elements such as lines (polygons), ellipses 
and rectangles. The plotter comes along with these basic elements but also let
you define your own {@link org.knime.base.node.viz.plotter.basic.BasicDrawingElement} 
and add it to the drawing pane.
</p>
<p>
The next sub branch of the basic plotter is the {@link org.knime.base.node.viz.plotter.columns.TwoColumnPlotter}
which plots two selectable columns. <br />
The following diagram roughly sketches the hierachy described so far with their 
implementing components. <br />
<img src="doc-files/overviewClassDiagram.png" alt="Components of the hierarchy described so far" />
</p>
<p>
All plotters deeper down the hierarchy are special implementations, which can 
also be extended, though. These are the {@link org.knime.base.node.viz.plotter.box.BoxPlotter}, 
realizing a so-called box-and-whisker plot, 
{@link org.knime.base.node.viz.plotter.dendrogram.DendrogramPlotter}, 
which converts a hierachical cluster result into a dendrogram, 
the {@link org.knime.base.node.viz.plotter.line.LinePlotter}, which draws the values 
of each column as a line, the {@link org.knime.base.node.viz.plotter.parcoord.ParallelCoordinatesPlotter},
which draws the columns as parallel axes and connects the values of one row by a line,
the {@link org.knime.base.node.viz.plotter.scatter.ScatterPlotter}, painting the data values of two 
selected columns as dots in 2-dimensional space, 
and the {@link org.knime.base.node.viz.plotter.scattermatrix.ScatterMatrixPlotter}, which displays
a matrix of 2-dimensional scatter plots for every column combination.
</p>
<p> 
This subframework also provides a Node to easily add a plotter to the KNIME framework.
The {@link org.knime.base.node.viz.plotter.node.DefaultVisualizationNodeView} is constructed with 
a <code>NodeModel</code> and a plotter. If only the incoming data is needed for the visualization,
the {@link org.knime.base.node.viz.plotter.node.DefaultVisualizationNodeModel} can be used. 
It takes the incoming data, puts it in a {@link org.knime.base.node.util.DataArray} and realizes the 
loading and saving of the data. It also implements the {@link org.knime.base.node.viz.plotter.DataProvider}
interface on which the plotter relies to get the data to visualize. In cases where not
a {@link org.knime.base.node.util.DataArray} is used to represent the data, the 
DefaultVisualizationNode has to be extended or replaced by a more sophisticated implementation.
If the {@link org.knime.base.node.viz.plotter.node.DefaultVisualizationNodeModel} is used, only a 
{@link org.knime.core.node.NodeFactory} has to be defined, where the code might look like the following 
example:
</p>
<pre>
    /**
     * @see org.knime.core.node.NodeFactory#createNodeDialogPane()
     */
    protected NodeDialogPane createNodeDialogPane() {
        return new DefaultVisualizationNodeDialog();
    }

    /**
     * @see org.knime.core.node.NodeFactory#createNodeModel()
     */
    public NodeModel createNodeModel() {
        return new DefaultVisualizationNodeModel();
    }

    /**
     * @see org.knime.core.node.NodeFactory#createNodeView(int, 
     * org.knime.core.node.NodeModel)
     */
    public NodeView createNodeView(final int viewIndex, 
            final NodeModel nodeModel) {
        return new DefaultVisualizationNodeView(nodeModel, new LinePlotter());
    }
</pre>
For more information see also the detailed <a href="doc-files/plotter.html">description</a>.
</body>
